
*========================================================
*-=======================================================
*=======Collective Labor Rights and Chinese FDI =========
*=======Yujeong YANG						=============
*=======International Interactions			=============
*=======August,2023 				    	=============
*========================================================
*========================================================
*-=======================================================
 use "ChineseOFDI&CLR" , clear

 *===Figure 1===*
 use "ChineseOFDI&CLR" , clear
keep if devcountries==0 
collapse (sum) cofdi_developed=china_ofdi_stock , by (year)
save "cofdi_developed",replace
use "ChineseOFDI&CLR" , clear
keep if devcountries==1 
collapse (sum) cofdi_developing=china_ofdi_stock , by (year)
merge 1:1 year using  "cofdi_developed.dta"
replace cofdi_developing= cofdi_developing/1000000000
replace cofdi_developed= cofdi_developed/1000000000


graph bar  cofdi_developed cofdi_developing, over (year, lab(angle(45))) stack ytitle("Chinese FDI Stock (Billions USD)") ///
 legend(cols(1) label(1 "Chinese FDI stock in Developed Countries") label(2 "Chinese FDI Stock in Developing Countries")) ///
graphregion(col(white)) bar(1, color(black)) bar(2, color(gs10))

***Table 1. Chinese FDI and collective labor rights (all countries) ***


use "ChineseOFDI&CLR.dta", replace
 
 #delimit ;
macro define covars0 " gdp_log   gdpgrowth   rent polity2"
;
#delimit ;
macro define covars1 " gdp_log     gdpgrowth   rent polity2   trade bit_update overallLR_geo overallLR_inc ilo "
;
#delimit ;
macro define covars2 " gdp_log     gdpgrowth   rent polity2   overallLR_geo overallLR_inc  ilo trade bit_update bit_rat_china_carryover bri_cfr_carryover  leadervisit unscmember  taiwan"
;
#delimit ;
macro define covars3 " gdp_log     gdpgrowth   rent polity2   overallLR_geo overallLR_inc  ilo trade bit_update bit_rat_china_carryover bri_cfr_carryover  leadervisit unscmember   taiwan  intrastate interstate_all"
;

gen instrument = cofdi_stock_overallfdi *probability_cofdi
tab year, gen(year_)

xtset cowcode year



eststo clear
eststo: xtpcse overallLR  L1.cofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars0  i.year i.cowcode   , correlation(psar1)
eststo: xtpcse overallLR  L1.cofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars1  i.year i.cowcode   , correlation(psar1)
eststo: xtpcse overallLR  L1.cofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars2  i.year i.cowcode   , correlation(psar1)
eststo: xtpcse overallLR  L1.cofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars3  i.year i.cowcode   , correlation(psar1)
eststo: xtpcse overallLR  L1.overallLR L1.cofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars3  i.year i.cowcode   , correlation(psar1)
eststo: xtivreg2 overallLR  (L1.cofdi_stock_gdp= L1.instrument )   L1.nonchina_fdi_stock_gdp $covars3 year_*  , fe first gmm2s


esttab using "overall_allcountries.tex", label drop( *cowcode* *year* )  /// 
order (L.cofdi_stock_gdp L.nonchina_fdi_stock_gdp  /// 
gdp_log     gdpgrowth   rents polity2    trade bit_update  overallLR_geo overallLR_inc  ilo ///
bit_rat_china_carryover bri_cfr_carryover  leadervisit unscmember     taiwan  /// 
intrastate interstate_all )  ///
nonotes se(3) b(4) replace star(* 0.10 ** 0.05 *** 0.01) compress nogaps  nobase nodepvars mtitles("" "" "" "" "" "") stats(N N_g, fmt(0 0 ) label(Observations Countries ))




****Table 2. Collective labor rights in developing and developed host countries ***  
gen china_ofdi_stock_gdp_lag=L1.cofdi_stock_gdp
eststo clear
eststo: xtpcse overallLR  c.china_ofdi_stock_gdp_lag##i.devcountries   L1. nonchina_fdi_stock_gdp  $covars3  i.year i.cowcode  
eststo: xtpcse overallLR  L1.cofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars3  i.year i.cowcode  if devcountries==1  , correlation(psar1)
eststo: xtivreg2 overallLR  (L1.cofdi_stock_gdp= L1.instrument )   L1.nonchina_fdi_stock_gdp $covars3 year_* if devcountries==1 , fe first gmm2s
eststo: xtpcse overallLR  L1.cofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars3  i.year i.cowcode  if devcountries==0  , correlation(psar1)
eststo: xtivreg2 overallLR  (L1.cofdi_stock_gdp= L1.instrument )   L1.nonchina_fdi_stock_gdp $covars3 year_* if devcountries==0 , fe first gmm2s

esttab using "overall_by_developmentLevel.tex", label drop( gdp_log     gdpgrowth  ///
  rents polity2   overallLR_geo overallLR_inc  ilo trade bit_update bit_rat_china_carryover ///
  bri_cfr_carryover  leadervisit unscmember   taiwan  intrastate interstate_all  *cowcode* *year* )  /// 
order (L.cofdi_stock_gdp L.nonchina_fdi_stock_gdp  /// 
gdp_log     gdpgrowth   rent polity2   trade bit_update overallLR_geo overallLR_inc  ilo  ///
bit_rat_china_carryover bri_cfr_carryover  leadervisit unscmember    taiwan  /// 
intrastate interstate_all )  ///
 nonotes se(3) b(4) replace star(* 0.10 ** 0.05 *** 0.01) compress nogaps  nobase nodepvars mtitles("" "" "" "" "" "") stats(N N_g, fmt(0 0 ) label(Observations Countries ))



**Table 3. Collective labor rights in Law and Practice  ****

eststo clear
eststo: xtpcse  lawLR    L1.cofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars0  i.year i.cowcode   , correlation(psar1)
eststo: xtpcse  lawLR    L1.cofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars0  i.year i.cowcode   if devcountries==1, correlation(psar1)
eststo: xtpcse  lawLR    L1.cofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars0  i.year i.cowcode   if devcountries==0, correlation(psar1)
eststo: xtpcse  practiceLR    L1.cofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars0  i.year i.cowcode   , correlation(psar1)
eststo: xtpcse  practiceLR    L1.cofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars0  i.year i.cowcode   if devcountries==1, correlation(psar1)
eststo: xtpcse  practiceLR    L1.cofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars0  i.year i.cowcode   if devcountries==0, correlation(psar1)



 esttab using "CLR_LawPractice_by_developmentLevel.tex", label drop( gdp_log     gdpgrowth  ///
  rents polity2   overallLR_geo overallLR_inc  ilo trade bit_update bit_rat_china_carryover ///
  bri_cfr_carryover  leadervisit unscmember   taiwan  intrastate interstate_all  *cowcode* *year* )  /// 
order (L.cofdi_stock_gdp L.nonchina_fdi_stock_gdp  /// 
gdp_log     gdpgrowth   rents polity2    trade bit_update overallLR_geo overallLR_inc  ilo ///
bit_rat_china_carryover bri_cfr_carryover  leadervisit unscmember     taiwan  /// 
intrastate interstate_all )  ///
nonotes se(3) b(4) replace star(* 0.10 ** 0.05 *** 0.01) compress nogaps  nobase nodepvars mtitles("" "" "" "" "" "") stats(N N_g, fmt(0 0 ) label(Observations Countries ))





*====Table 4. Collective labor rights by sources of FDI ****
eststo clear
eststo: xtpcse overallLR  L1.cofdi_stock_gdp  L1.FDI_developed_gdp_unctad L1.FDI_developing_gdp_unctad $covars0 i.year i.cowcode    , correlation(psar1)
eststo: xtpcse lawLR  L1.cofdi_stock_gdp  L1.FDI_developed_gdp_unctad L1.FDI_developing_gdp_unctad $covars0 i.year i.cowcode    , correlation(psar1)
eststo: xtpcse practiceLR  L1.cofdi_stock_gdp  L1.FDI_developed_gdp_unctad L1.FDI_developing_gdp_unctad $covars0 i.year i.cowcode    , correlation(psar1)
eststo: xtpcse overallLR  L1.cofdi_stock_gdp  L1.FDI_demo_gdp_unctad L1.FDI_auto_gdp_unctad  $covars0 i.year i.cowcode     , correlation(psar1)
eststo: xtpcse lawLR  L1.cofdi_stock_gdp  L1.FDI_demo_gdp_unctad L1.FDI_auto_gdp_unctad  $covars0 i.year i.cowcode     , correlation(psar1)
eststo: xtpcse practiceLR  L1.cofdi_stock_gdp  L1.FDI_demo_gdp_unctad L1.FDI_auto_gdp_unctad  $covars0 i.year i.cowcode     , correlation(psar1)
 
 
 esttab using "CLR_byDifferentGroupings.tex", label drop( gdp_log     gdpgrowth  ///
  rents polity2   overallLR_geo overallLR_inc  ilo trade bit_update bit_rat_china_carryover ///
  bri_cfr_carryover  leadervisit unscmember   taiwan  intrastate interstate_all  *cowcode* *year* )  /// 
order (L.cofdi_stock_gdp L.nonchina_fdi_stock_gdp  /// 
gdp_log     gdpgrowth   rents polity2    trade bit_update overallLR_geo overallLR_inc  ilo ///
bit_rat_china_carryover bri_cfr_carryover  leadervisit unscmember    taiwan  /// 
intrastate interstate_all )  ///
nonotes se(3) b(4) replace star(* 0.10 ** 0.05 *** 0.01) compress nogaps  nobase nodepvars mtitles("" "" "" "" "" "") stats(N N_g, fmt(0 0 ) label(Observations Countries ))




 *===Table 5. Chinese FDI and substnative Labor Rights=====*

eststo clear
eststo:xtpcse sri_l   L1.cofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars0   i.year i.cowcode  if devcountries==1 ,  pairwise correlation(psar1)
eststo:xtpcse sri_l   L1.cofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars0   i.year i.cowcode  if devcountries==0 ,  pairwise correlation(psar1)
 
eststo:xtpcse sri_p   L1.cofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars0   i.year i.cowcode  if devcountries==1 ,  pairwise correlation(psar1)
eststo:xtpcse sri_p   L1.cofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars0   i.year i.cowcode  if devcountries==0 ,  pairwise correlation(psar1)

esttab using "SubstantiveLR.tex", label drop( gdp_log     gdpgrowth  ///
  rents polity2   overallLR_geo overallLR_inc  ilo trade bit_update bit_rat_china_carryover ///
  bri_cfr_carryover  leadervisit unscmember   taiwan  intrastate interstate_all  *cowcode* *year* )  /// 
order (L.cofdi_stock_gdp L.nonchina_fdi_stock_gdp  /// 
gdp_log     gdpgrowth   rents polity2    trade bit_update overallLR_geo overallLR_inc  ilo ///
bit_rat_china_carryover bri_cfr_carryover  leadervisit unscmember     taiwan  /// 
intrastate interstate_all )  ///
nonotes se(3) b(4) replace star(* 0.10 ** 0.05 *** 0.01) compress nogaps  nobase nodepvars mtitles("" "" "" "" "" "") stats(N N_g, fmt(0 0 ) label(Observations Countries ))




*Appendix*

*====Table A1. Summary Statistics=========*
sutex2 overallLR lawLR practiceLR sri_l  sri_p  cofdi_stock_gdp   nonchina_fdi_stock_gdp     gdp_log   gdpgrowth   rent polity2   overallLR_geo overallLR_inc  ilo trade bit_update bit_rat_china_carryover bri_cfr_carryover intrastate interstate_all leadervisit unscmember  taiwan FDI_developed_gdp_ FDI_developing_gdp_unctad   FDI_demo_gdp_unctad  FDI_auto_gdp_unctad   primary_cgit_gdp secondary_cgit_gdp tertiary_cgit_gdp  state_1 private    , minmax

*====Table A2. Summary Statistics=========*
eststo clear
eststo: xtivreg2 overallLR  (L1.cofdi_stock_gdp= L1.instrument )   L1.nonchina_fdi_stock_gdp $covars3 year_*  , fe first gmm2s savefprefix(st1)
eststo: xtivreg2 overallLR  (L1.cofdi_stock_gdp= L1.instrument )   L1.nonchina_fdi_stock_gdp $covars3 year_* if devcountries==1 , fe first gmm2s savefprefix(st2)
esttab  st1* st2* using firstst.tex, label drop(   *year* )  /// 
order (L.instrument L.nonchina_fdi_stock_gdp  /// 
gdp_log     gdpgrowth   rents polity2    trade bit_update  overallLR_geo overallLR_inc  ilo ///
bit_rat_china_carryover bri_cfr_carryover  leadervisit unscmember     taiwan  /// 
intrastate interstate_all )  ///
nonotes se(3) b(4) replace star(* 0.10 ** 0.05 *** 0.01) compress nogaps  nobase nodepvars mtitles("" "" "" "" "" "") stats(N N_g, fmt(0 0 ) label(Observations Countries ))  


 
*===Table A3. Chinese investment in different industrial sectors and collective labor rights =====*

 eststo clear
eststo: xtpcse overallLR  L1.primary_cgit_gdp L1.secondary_cgit_gdp L1.tertiary_cgit_gdp  L1. nonchina_fdi_inflow_gdp $covars0 i.year i.cowcode, corr(psar1)
eststo:xtpcse lawLR  L1.primary_cgit_gdp L1.secondary_cgit_gdp L1.tertiary_cgit_gdp  L1. nonchina_fdi_inflow_gdp $covars0 i.year i.cowcode, corr(psar1)
eststo:xtpcse practiceLR  L1.primary_cgit_gdp L1.secondary_cgit_gdp L1.tertiary_cgit_gdp  L1. nonchina_fdi_inflow_gdp  $covars0 i.year i.cowcode, corr(psar1)

 esttab using "CLR_bySector.tex",  label drop( gdp_log     gdpgrowth  ///
  rents polity2   overallLR_geo overallLR_inc  ilo trade bit_update bit_rat_china_carryover ///
  bri_cfr_carryover  leadervisit unscmember   taiwan  intrastate interstate_all  *cowcode* *year* )  /// 
order (gdp_log     gdpgrowth   rents polity2   trade bit_update  overallLR_geo overallLR_inc  ilo ///
bit_rat_china_carryover bri_cfr_carryover  leadervisit unscmember     taiwan  /// 
intrastate interstate_all )  ///
nonotes se(3) b(4) replace star(* 0.10 ** 0.05 *** 0.01) compress nogaps  nobase nodepvars mtitles("" "" "" "" "" "") stats(N N_g, fmt(0 0 ) label(Observations Countries ))


*===Table A4. Chinese FDI by ownership=====*
eststo clear

 eststo:xtpcse overallLR  L1.state_1  L1.private L1.fdi_stock_gdp  $covars0  i.year i.cowcode ,  pairwise correlation(psar1)   
 eststo:xtpcse lawLR  L1.state_1  L1.private L1.fdi_stock_gdp  $covars0  i.year i.cowcode ,  pairwise correlation(psar1)
 eststo:xtpcse practiceLR  L1.state_1  L1.private L1.fdi_stock_gdp  $covars0  i.year i.cowcode ,  pairwise correlation(psar1)	

 esttab using "CLR_byOwnership.tex", label drop( gdp_log     gdpgrowth  ///
  rents polity2   overallLR_geo overallLR_inc  ilo trade bit_update bit_rat_china_carryover ///
  bri_cfr_carryover  leadervisit unscmember   taiwan  intrastate interstate_all  *cowcode* *year* )  /// 
order (gdp_log     gdpgrowth   rents polity2   trade bit_update  overallLR_geo overallLR_inc  ilo ///
bit_rat_china_carryover bri_cfr_carryover  leadervisit unscmember     taiwan  /// 
intrastate interstate_all )  ///
nonotes se(3) b(4) replace star(* 0.10 ** 0.05 *** 0.01) compress nogaps  nobase nodepvars mtitles("" "" "" "" "" "") stats(N N_g, fmt(0 0 ) label(Observations Countries ))



